package listdemon;

import java.util.ArrayList;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 21626
 * Date: 2024-09-27
 * Time: 8:57
 */
public class Test3 {
    public static void main(String[] args) {
        ArrayList<Integer> list = new ArrayList<>();
        list.add(1);
        list.add(1,19);
        list.add(3);
        list.clear();
    }
    public static void main1(String[] args) {
        MyArrayList myArrayList = new MyArrayList();
        myArrayList.add(1);
        myArrayList.add(2);
        myArrayList.add(3);
        myArrayList.display();
        myArrayList.add(2,19);
        myArrayList.display();
        System.out.println(myArrayList.get(2));
        System.out.println(myArrayList.contains(3));
        myArrayList.set(2,10);
        System.out.println(myArrayList.get(2));
    }
}
